package linear_enumeration;

public class basic33 {

    public int search(int[] nums, int target) {
  int index= 0;
while (index< nums.length){
    if (target==nums[index]){
        return index;
    }
    index++;
}
       return  -1;

    }

    public static void main(String[] args) {
        basic33 basic33 = new basic33();
        System.out.println(basic33.search(new int[]{2, 3, 4, 5, 6}, 3));



    }
}
